/**
├── controllers
    └── bs_hour_yb.js
*/
const ArticleModel = require('../modules/bs_hour_yb')

class articleController {
  /**
   * 获取统计详情
   * @returns {Promise.<void>}
   */
  static async findAll(ctx) {
    try {
      // 查询文章详情模型
      let data = await ArticleModel.getArticleDetail();
      ctx.response.status = 200;
      ctx.body = {
        code: 200,
        msg: '查询成功',
        data
      }

    } catch (err) {
      ctx.response.status = 412;
      ctx.body = {
        code: 412,
        msg: '查询失败',
        data
      }
    }
  }
}

module.exports = articleController